//package com.ag.answergames.controller;
//
//import com.ag.answergames.service.wallet.PersonalDetailService;
//import com.ag.answergames.vo.PersonalAccountJournalVO;
//import com.ag.answergames.vo.common.Result;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import javax.servlet.http.HttpServletRequest;
//import java.io.BufferedReader;
//import java.io.IOException;
//import java.io.InputStream;
//import java.io.InputStreamReader;
//
///**
// * @author: aoaowu
// * @program: answer-game
// * @description: 支付接口
// * @create: 2023/04/20 12:10
// **/
//@RestController
//@RequestMapping("/back/pay")
//@Api(value = "pay", description = "支付的相关api操作")
//public class PayController {
//
//    @Autowired
//    PersonalDetailService personalDetailService;
//
//    @PostMapping("wxpay/Notify")
//    @ApiOperation(value = "微信支付回调函数", notes = "", response = Result.class, httpMethod = "POST")
//    public String wxpay_notify(@ApiParam(value = "回调请求", required = true) HttpServletRequest request) {
//
//        //1 获取微信支付异步回调结果
//        String josnStirng = getPostStr(request);
//        return josnStirng;
//    }
//
//
//
//    public static String getPostStr(HttpServletRequest request) {
//        StringBuffer sb = new StringBuffer();
//        try {
//            InputStream is = request.getInputStream();
//            InputStreamReader isr = new InputStreamReader(is, "UTF-8");
//            BufferedReader br = new BufferedReader(isr);
//            String s = "";
//
//            while ((s = br.readLine()) != null) {
//                sb.append(s);
//            }
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//        String msg = sb.toString();
//        return msg;
//    }
//}
